<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: atcacert_date.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00143_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">atcacert_date.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00143.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#ifndef ATCACERT_DATE_H</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#define ATCACERT_DATE_H</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00131.html">atcacert.h</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">// Inform function naming when compiling in C++</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="a03587.html">   52</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a03587.html">atcacert_tm_utc_s</a></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;{</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="a03587.html#a18df301c1a10c8d493da86ce5c2aea78">   54</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="a03587.html#a18df301c1a10c8d493da86ce5c2aea78">tm_sec</a>;     <span class="comment">// 0 to 59</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="a03587.html#a987fa9280fe4cd6c6b8f77409f1c1504">   55</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="a03587.html#a987fa9280fe4cd6c6b8f77409f1c1504">tm_min</a>;     <span class="comment">// 0 to 59</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="a03587.html#a4d171061df9e012fcfbd1172b8440d5f">   56</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="a03587.html#a4d171061df9e012fcfbd1172b8440d5f">tm_hour</a>;    <span class="comment">// 0 to 23</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="a03587.html#a02048604d30b880033311cf542d63f92">   57</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="a03587.html#a02048604d30b880033311cf542d63f92">tm_mday</a>;    <span class="comment">// 1 to 31</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="a03587.html#ada983deda100b604bee5716512453658">   58</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="a03587.html#ada983deda100b604bee5716512453658">tm_mon</a>;     <span class="comment">// 0 to 11</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="a03587.html#a994c4f4519ba57e186580d21cc86f9e5">   59</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="a03587.html#a994c4f4519ba57e186580d21cc86f9e5">tm_year</a>;    <span class="comment">// years since 1900</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;} <a class="code" href="a03534.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="a03534.html#ga62a103735770a0f935a472fc2c1d78db">   65</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="a03534.html#ga62a103735770a0f935a472fc2c1d78db">atcacert_date_format_e</a></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dba593aa8634c6a3d493cb7bebe4a40a8b5">   67</a></span>&#160;    <a class="code" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dba593aa8634c6a3d493cb7bebe4a40a8b5">DATEFMT_ISO8601_SEP</a>,        </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbad080b870f84643db2fdc7934560c322d">   68</a></span>&#160;    <a class="code" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbad080b870f84643db2fdc7934560c322d">DATEFMT_RFC5280_UTC</a>,        </div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbacfca1392e4cde6f2d467f9f69641890a">   69</a></span>&#160;    <a class="code" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbacfca1392e4cde6f2d467f9f69641890a">DATEFMT_POSIX_UINT32_BE</a>,    </div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dba24c30a16c9f26257dcd0464b7aa69161">   70</a></span>&#160;    <a class="code" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dba24c30a16c9f26257dcd0464b7aa69161">DATEFMT_POSIX_UINT32_LE</a>,    </div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbac95f38ee25fdaad80fb77dcf9d71a93e">   71</a></span>&#160;    <a class="code" href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbac95f38ee25fdaad80fb77dcf9d71a93e">DATEFMT_RFC5280_GEN</a>         </div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;} <a class="code" href="a03534.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a>;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="a03534.html#ga4cd9a96f5434fa3bc256878031d63846">   74</a></span>&#160;<span class="preprocessor">#define DATEFMT_ISO8601_SEP_SIZE     (20)</span></div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="a03534.html#ga420f3d438f3f8f7c140512910e54d09a">   75</a></span>&#160;<span class="preprocessor">#define DATEFMT_RFC5280_UTC_SIZE     (13)</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="a03534.html#gafe13e835d79405f28daa3449f732ebcd">   76</a></span>&#160;<span class="preprocessor">#define DATEFMT_POSIX_UINT32_BE_SIZE (4)</span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="a03534.html#gaa7c545ab9944dc7261d689680e2b00f4">   77</a></span>&#160;<span class="preprocessor">#define DATEFMT_POSIX_UINT32_LE_SIZE (4)</span></div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="a03534.html#gae058e0e8944f408fa251bc4f4136d79c">   78</a></span>&#160;<span class="preprocessor">#define DATEFMT_RFC5280_GEN_SIZE     (15)</span></div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="a03534.html#gae920fb7b153cf98e0d10365ec1d364de">   79</a></span>&#160;<span class="preprocessor">#define DATEFMT_MAX_SIZE             DATEFMT_ISO8601_SEP_SIZE</span></div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="a03534.html#ga82737078e820e6d6beeca7466841e43d">   80</a></span>&#160;<span class="preprocessor">#define ATCACERT_DATE_FORMAT_SIZES_COUNT 5</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="a03534.html#ga8b93faeabd399250750a5ed9401d897e">ATCACERT_DATE_FORMAT_SIZES</a>[<a class="code" href="a03534.html#ga82737078e820e6d6beeca7466841e43d">ATCACERT_DATE_FORMAT_SIZES_COUNT</a>];</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#gaab946b2ea5dba6d1addacc995a6989ae">atcacert_date_enc</a>(<a class="code" href="a03534.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a>   format,</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                      <span class="keyword">const</span> <a class="code" href="a03587.html">atcacert_tm_utc_t</a>* timestamp,</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                      uint8_t*                 formatted_date,</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                      <span class="keywordtype">size_t</span>*                  formatted_date_size);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga368d038c02673b1e6ddacfd175786e6a">atcacert_date_dec</a>(<a class="code" href="a03534.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a> format,</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                      <span class="keyword">const</span> uint8_t*         formatted_date,</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                      <span class="keywordtype">size_t</span>                 formatted_date_size,</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                      <a class="code" href="a03587.html">atcacert_tm_utc_t</a>*     timestamp);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga5da5a0589a6168aafd34b4aac4e07553">atcacert_date_enc_compcert</a>(<span class="keyword">const</span> <a class="code" href="a03587.html">atcacert_tm_utc_t</a> * issue_date,</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                               uint8_t                   expire_years,</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                               uint8_t                   enc_dates[3]);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#gaba31331bcfab203c786004b027512fab">atcacert_date_dec_compcert</a>(<span class="keyword">const</span> uint8_t          enc_dates[3],</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                               <a class="code" href="a03534.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a> expire_date_format,</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                               <a class="code" href="a03587.html">atcacert_tm_utc_t</a>*     issue_date,</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                               <a class="code" href="a03587.html">atcacert_tm_utc_t</a>*     expire_date);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga1d267b06c94e1db2aa2f6e91df1c843f">atcacert_date_get_max_date</a>(<a class="code" href="a03534.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a> format, <a class="code" href="a03587.html">atcacert_tm_utc_t</a>* timestamp);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#gae40aeb71d824e8bbe3233e86f3fb6a3f">atcacert_date_enc_iso8601_sep</a>(<span class="keyword">const</span> <a class="code" href="a03587.html">atcacert_tm_utc_t</a> * timestamp,</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;                                  uint8_t                   formatted_date[<a class="code" href="a03534.html#ga4cd9a96f5434fa3bc256878031d63846">DATEFMT_ISO8601_SEP_SIZE</a>]);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga3ff21be0f011ce56dfde5e2ac99e17ce">atcacert_date_dec_iso8601_sep</a>(<span class="keyword">const</span> uint8_t      formatted_date[<a class="code" href="a03534.html#ga4cd9a96f5434fa3bc256878031d63846">DATEFMT_ISO8601_SEP_SIZE</a>],</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                                  <a class="code" href="a03587.html">atcacert_tm_utc_t</a>* timestamp);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#gaa83e2f3a3f83b321dade6cd3211136db">atcacert_date_enc_rfc5280_utc</a>(<span class="keyword">const</span> <a class="code" href="a03587.html">atcacert_tm_utc_t</a> * timestamp,</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                                  uint8_t                   formatted_date[<a class="code" href="a03534.html#ga420f3d438f3f8f7c140512910e54d09a">DATEFMT_RFC5280_UTC_SIZE</a>]);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga7fa37d88f9405a3557110e58468f9e6e">atcacert_date_dec_rfc5280_utc</a>(<span class="keyword">const</span> uint8_t      formatted_date[<a class="code" href="a03534.html#ga420f3d438f3f8f7c140512910e54d09a">DATEFMT_RFC5280_UTC_SIZE</a>],</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                                  <a class="code" href="a03587.html">atcacert_tm_utc_t</a>* timestamp);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#gaaeb955dfc5b73719e2ecca542c2fc249">atcacert_date_enc_rfc5280_gen</a>(<span class="keyword">const</span> <a class="code" href="a03587.html">atcacert_tm_utc_t</a> * timestamp,</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;                                  uint8_t                   formatted_date[<a class="code" href="a03534.html#gae058e0e8944f408fa251bc4f4136d79c">DATEFMT_RFC5280_GEN_SIZE</a>]);</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#gadd219151c074c3ec7785d68741a1cae1">atcacert_date_dec_rfc5280_gen</a>(<span class="keyword">const</span> uint8_t      formatted_date[<a class="code" href="a03534.html#gae058e0e8944f408fa251bc4f4136d79c">DATEFMT_RFC5280_GEN_SIZE</a>],</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;                                  <a class="code" href="a03587.html">atcacert_tm_utc_t</a>* timestamp);</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga1160e4293d7831e15a47e7b3f47013ca">atcacert_date_enc_posix_uint32_be</a>(<span class="keyword">const</span> <a class="code" href="a03587.html">atcacert_tm_utc_t</a> * timestamp,</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                                      uint8_t                   formatted_date[<a class="code" href="a03534.html#gafe13e835d79405f28daa3449f732ebcd">DATEFMT_POSIX_UINT32_BE_SIZE</a>]);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga37893ca05c0e3ccbcec3725228b8a818">atcacert_date_dec_posix_uint32_be</a>(<span class="keyword">const</span> uint8_t      formatted_date[<a class="code" href="a03534.html#gafe13e835d79405f28daa3449f732ebcd">DATEFMT_POSIX_UINT32_BE_SIZE</a>],</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                                      <a class="code" href="a03587.html">atcacert_tm_utc_t</a>* timestamp);</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#ga4825cb7a817fa9471cfe30a1aa984b8f">atcacert_date_enc_posix_uint32_le</a>(<span class="keyword">const</span> <a class="code" href="a03587.html">atcacert_tm_utc_t</a> * timestamp,</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                                      uint8_t                   formatted_date[<a class="code" href="a03534.html#gaa7c545ab9944dc7261d689680e2b00f4">DATEFMT_POSIX_UINT32_LE_SIZE</a>]);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a03534.html#gab5bbaaf84f1c19409ee276241e9e2f6d">atcacert_date_dec_posix_uint32_le</a>(<span class="keyword">const</span> uint8_t      formatted_date[<a class="code" href="a03534.html#gaa7c545ab9944dc7261d689680e2b00f4">DATEFMT_POSIX_UINT32_LE_SIZE</a>],</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                                      <a class="code" href="a03587.html">atcacert_tm_utc_t</a>* timestamp);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;}</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="a03534_html_gga62a103735770a0f935a472fc2c1d78dba24c30a16c9f26257dcd0464b7aa69161"><div class="ttname"><a href="a03534.html#gga62a103735770a0f935a472fc2c1d78dba24c30a16c9f26257dcd0464b7aa69161">DATEFMT_POSIX_UINT32_LE</a></div><div class="ttdoc">POSIX (aka UNIX) date format. Seconds since Jan 1, 1970. 32 bit unsigned integer, little endian...</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:70</div></div>
<div class="ttc" id="a03587_html_ada983deda100b604bee5716512453658"><div class="ttname"><a href="a03587.html#ada983deda100b604bee5716512453658">atcacert_tm_utc_s::tm_mon</a></div><div class="ttdeci">int tm_mon</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:58</div></div>
<div class="ttc" id="a03534_html_gab5bbaaf84f1c19409ee276241e9e2f6d"><div class="ttname"><a href="a03534.html#gab5bbaaf84f1c19409ee276241e9e2f6d">atcacert_date_dec_posix_uint32_le</a></div><div class="ttdeci">int atcacert_date_dec_posix_uint32_le(const uint8_t formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE], atcacert_tm_utc_t *timestamp)</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:972</div></div>
<div class="ttc" id="a03534_html_ga3ff21be0f011ce56dfde5e2ac99e17ce"><div class="ttname"><a href="a03534.html#ga3ff21be0f011ce56dfde5e2ac99e17ce">atcacert_date_dec_iso8601_sep</a></div><div class="ttdeci">int atcacert_date_dec_iso8601_sep(const uint8_t formatted_date[DATEFMT_ISO8601_SEP_SIZE], atcacert_tm_utc_t *timestamp)</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:312</div></div>
<div class="ttc" id="a03534_html_gaaeb955dfc5b73719e2ecca542c2fc249"><div class="ttname"><a href="a03534.html#gaaeb955dfc5b73719e2ecca542c2fc249">atcacert_date_enc_rfc5280_gen</a></div><div class="ttdeci">int atcacert_date_enc_rfc5280_gen(const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_RFC5280_GEN_SIZE])</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:537</div></div>
<div class="ttc" id="a03534_html_gaab946b2ea5dba6d1addacc995a6989ae"><div class="ttname"><a href="a03534.html#gaab946b2ea5dba6d1addacc995a6989ae">atcacert_date_enc</a></div><div class="ttdeci">int atcacert_date_enc(atcacert_date_format_t format, const atcacert_tm_utc_t *timestamp, uint8_t *formatted_date, size_t *formatted_date_size)</div><div class="ttdoc">Format a timestamp according to the format type. </div><div class="ttdef"><b>Definition:</b> atcacert_date.c:40</div></div>
<div class="ttc" id="a03534_html_ga81a3a91e9aa4aca39ca6fe8a7a94b121"><div class="ttname"><a href="a03534.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a></div><div class="ttdeci">struct atcacert_tm_utc_s atcacert_tm_utc_t</div></div>
<div class="ttc" id="a03534_html_gaa7c545ab9944dc7261d689680e2b00f4"><div class="ttname"><a href="a03534.html#gaa7c545ab9944dc7261d689680e2b00f4">DATEFMT_POSIX_UINT32_LE_SIZE</a></div><div class="ttdeci">#define DATEFMT_POSIX_UINT32_LE_SIZE</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:77</div></div>
<div class="ttc" id="a03534_html_ga7fa37d88f9405a3557110e58468f9e6e"><div class="ttname"><a href="a03534.html#ga7fa37d88f9405a3557110e58468f9e6e">atcacert_date_dec_rfc5280_utc</a></div><div class="ttdeci">int atcacert_date_dec_rfc5280_utc(const uint8_t formatted_date[DATEFMT_RFC5280_UTC_SIZE], atcacert_tm_utc_t *timestamp)</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:464</div></div>
<div class="ttc" id="a03534_html_gga62a103735770a0f935a472fc2c1d78dba593aa8634c6a3d493cb7bebe4a40a8b5"><div class="ttname"><a href="a03534.html#gga62a103735770a0f935a472fc2c1d78dba593aa8634c6a3d493cb7bebe4a40a8b5">DATEFMT_ISO8601_SEP</a></div><div class="ttdoc">ISO8601 full date YYYY-MM-DDThh:mm:ssZ. </div><div class="ttdef"><b>Definition:</b> atcacert_date.h:67</div></div>
<div class="ttc" id="a03534_html_ga62a103735770a0f935a472fc2c1d78db"><div class="ttname"><a href="a03534.html#ga62a103735770a0f935a472fc2c1d78db">atcacert_date_format_e</a></div><div class="ttdeci">atcacert_date_format_e</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:65</div></div>
<div class="ttc" id="a03534_html_ga420f3d438f3f8f7c140512910e54d09a"><div class="ttname"><a href="a03534.html#ga420f3d438f3f8f7c140512910e54d09a">DATEFMT_RFC5280_UTC_SIZE</a></div><div class="ttdeci">#define DATEFMT_RFC5280_UTC_SIZE</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:75</div></div>
<div class="ttc" id="a03534_html_gaa83e2f3a3f83b321dade6cd3211136db"><div class="ttname"><a href="a03534.html#gaa83e2f3a3f83b321dade6cd3211136db">atcacert_date_enc_rfc5280_utc</a></div><div class="ttdeci">int atcacert_date_enc_rfc5280_utc(const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_RFC5280_UTC_SIZE])</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:402</div></div>
<div class="ttc" id="a03587_html_a18df301c1a10c8d493da86ce5c2aea78"><div class="ttname"><a href="a03587.html#a18df301c1a10c8d493da86ce5c2aea78">atcacert_tm_utc_s::tm_sec</a></div><div class="ttdeci">int tm_sec</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:54</div></div>
<div class="ttc" id="a03587_html_a994c4f4519ba57e186580d21cc86f9e5"><div class="ttname"><a href="a03587.html#a994c4f4519ba57e186580d21cc86f9e5">atcacert_tm_utc_s::tm_year</a></div><div class="ttdeci">int tm_year</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:59</div></div>
<div class="ttc" id="a03534_html_gga62a103735770a0f935a472fc2c1d78dbad080b870f84643db2fdc7934560c322d"><div class="ttname"><a href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbad080b870f84643db2fdc7934560c322d">DATEFMT_RFC5280_UTC</a></div><div class="ttdoc">RFC 5280 (X.509) 4.1.2.5.1 UTCTime format YYMMDDhhmmssZ. </div><div class="ttdef"><b>Definition:</b> atcacert_date.h:68</div></div>
<div class="ttc" id="a03534_html_ga37893ca05c0e3ccbcec3725228b8a818"><div class="ttname"><a href="a03534.html#ga37893ca05c0e3ccbcec3725228b8a818">atcacert_date_dec_posix_uint32_be</a></div><div class="ttdeci">int atcacert_date_dec_posix_uint32_be(const uint8_t formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE], atcacert_tm_utc_t *timestamp)</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:928</div></div>
<div class="ttc" id="a03587_html_a987fa9280fe4cd6c6b8f77409f1c1504"><div class="ttname"><a href="a03587.html#a987fa9280fe4cd6c6b8f77409f1c1504">atcacert_tm_utc_s::tm_min</a></div><div class="ttdeci">int tm_min</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:55</div></div>
<div class="ttc" id="a03534_html_gga62a103735770a0f935a472fc2c1d78dbac95f38ee25fdaad80fb77dcf9d71a93e"><div class="ttname"><a href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbac95f38ee25fdaad80fb77dcf9d71a93e">DATEFMT_RFC5280_GEN</a></div><div class="ttdoc">RFC 5280 (X.509) 4.1.2.5.2 GeneralizedTime format YYYYMMDDhhmmssZ. </div><div class="ttdef"><b>Definition:</b> atcacert_date.h:71</div></div>
<div class="ttc" id="a03534_html_gga62a103735770a0f935a472fc2c1d78dbacfca1392e4cde6f2d467f9f69641890a"><div class="ttname"><a href="a03534.html#gga62a103735770a0f935a472fc2c1d78dbacfca1392e4cde6f2d467f9f69641890a">DATEFMT_POSIX_UINT32_BE</a></div><div class="ttdoc">POSIX (aka UNIX) date format. Seconds since Jan 1, 1970. 32 bit unsigned integer, big endian...</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:69</div></div>
<div class="ttc" id="a03587_html"><div class="ttname"><a href="a03587.html">atcacert_tm_utc_s</a></div><div class="ttdef"><b>Definition:</b> atcacert_date.h:52</div></div>
<div class="ttc" id="a03534_html_ga1160e4293d7831e15a47e7b3f47013ca"><div class="ttname"><a href="a03534.html#ga1160e4293d7831e15a47e7b3f47013ca">atcacert_date_enc_posix_uint32_be</a></div><div class="ttdeci">int atcacert_date_enc_posix_uint32_be(const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE])</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:873</div></div>
<div class="ttc" id="a03534_html_gaba31331bcfab203c786004b027512fab"><div class="ttname"><a href="a03534.html#gaba31331bcfab203c786004b027512fab">atcacert_date_dec_compcert</a></div><div class="ttdeci">int atcacert_date_dec_compcert(const uint8_t enc_dates[3], atcacert_date_format_t expire_date_format, atcacert_tm_utc_t *issue_date, atcacert_tm_utc_t *expire_date)</div><div class="ttdoc">Decode the issue and expire dates from the format used by the compressed certificate. </div><div class="ttdef"><b>Definition:</b> atcacert_date.c:1047</div></div>
<div class="ttc" id="a03534_html_ga7f389df0f74fd3593ab7e3a4d380433f"><div class="ttname"><a href="a03534.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a></div><div class="ttdeci">enum atcacert_date_format_e atcacert_date_format_t</div></div>
<div class="ttc" id="a03534_html_ga82737078e820e6d6beeca7466841e43d"><div class="ttname"><a href="a03534.html#ga82737078e820e6d6beeca7466841e43d">ATCACERT_DATE_FORMAT_SIZES_COUNT</a></div><div class="ttdeci">#define ATCACERT_DATE_FORMAT_SIZES_COUNT</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:80</div></div>
<div class="ttc" id="a03534_html_ga8b93faeabd399250750a5ed9401d897e"><div class="ttname"><a href="a03534.html#ga8b93faeabd399250750a5ed9401d897e">ATCACERT_DATE_FORMAT_SIZES</a></div><div class="ttdeci">const size_t ATCACERT_DATE_FORMAT_SIZES[ATCACERT_DATE_FORMAT_SIZES_COUNT]</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:32</div></div>
<div class="ttc" id="a03534_html_ga4825cb7a817fa9471cfe30a1aa984b8f"><div class="ttname"><a href="a03534.html#ga4825cb7a817fa9471cfe30a1aa984b8f">atcacert_date_enc_posix_uint32_le</a></div><div class="ttdeci">int atcacert_date_enc_posix_uint32_le(const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE])</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:947</div></div>
<div class="ttc" id="a03534_html_gafe13e835d79405f28daa3449f732ebcd"><div class="ttname"><a href="a03534.html#gafe13e835d79405f28daa3449f732ebcd">DATEFMT_POSIX_UINT32_BE_SIZE</a></div><div class="ttdeci">#define DATEFMT_POSIX_UINT32_BE_SIZE</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:76</div></div>
<div class="ttc" id="a03534_html_gadd219151c074c3ec7785d68741a1cae1"><div class="ttname"><a href="a03534.html#gadd219151c074c3ec7785d68741a1cae1">atcacert_date_dec_rfc5280_gen</a></div><div class="ttdeci">int atcacert_date_dec_rfc5280_gen(const uint8_t formatted_date[DATEFMT_RFC5280_GEN_SIZE], atcacert_tm_utc_t *timestamp)</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:591</div></div>
<div class="ttc" id="a03587_html_a02048604d30b880033311cf542d63f92"><div class="ttname"><a href="a03587.html#a02048604d30b880033311cf542d63f92">atcacert_tm_utc_s::tm_mday</a></div><div class="ttdeci">int tm_mday</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:57</div></div>
<div class="ttc" id="a03534_html_ga5da5a0589a6168aafd34b4aac4e07553"><div class="ttname"><a href="a03534.html#ga5da5a0589a6168aafd34b4aac4e07553">atcacert_date_enc_compcert</a></div><div class="ttdeci">int atcacert_date_enc_compcert(const atcacert_tm_utc_t *issue_date, uint8_t expire_years, uint8_t enc_dates[3])</div><div class="ttdoc">Encode the issue and expire dates in the format used by the compressed certificate. </div><div class="ttdef"><b>Definition:</b> atcacert_date.c:991</div></div>
<div class="ttc" id="a03534_html_ga368d038c02673b1e6ddacfd175786e6a"><div class="ttname"><a href="a03534.html#ga368d038c02673b1e6ddacfd175786e6a">atcacert_date_dec</a></div><div class="ttdeci">int atcacert_date_dec(atcacert_date_format_t format, const uint8_t *formatted_date, size_t formatted_date_size, atcacert_tm_utc_t *timestamp)</div><div class="ttdoc">Parse a formatted timestamp according to the specified format. </div><div class="ttdef"><b>Definition:</b> atcacert_date.c:74</div></div>
<div class="ttc" id="a03534_html_ga1d267b06c94e1db2aa2f6e91df1c843f"><div class="ttname"><a href="a03534.html#ga1d267b06c94e1db2aa2f6e91df1c843f">atcacert_date_get_max_date</a></div><div class="ttdeci">int atcacert_date_get_max_date(atcacert_date_format_t format, atcacert_tm_utc_t *timestamp)</div><div class="ttdoc">Return the maximum date available for the given format. </div><div class="ttdef"><b>Definition:</b> atcacert_date.c:102</div></div>
<div class="ttc" id="a00131_html"><div class="ttname"><a href="a00131.html">atcacert.h</a></div><div class="ttdoc">Declarations common to all atcacert code. </div></div>
<div class="ttc" id="a03534_html_gae40aeb71d824e8bbe3233e86f3fb6a3f"><div class="ttname"><a href="a03534.html#gae40aeb71d824e8bbe3233e86f3fb6a3f">atcacert_date_enc_iso8601_sep</a></div><div class="ttdeci">int atcacert_date_enc_iso8601_sep(const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_ISO8601_SEP_SIZE])</div><div class="ttdef"><b>Definition:</b> atcacert_date.c:248</div></div>
<div class="ttc" id="a03534_html_ga4cd9a96f5434fa3bc256878031d63846"><div class="ttname"><a href="a03534.html#ga4cd9a96f5434fa3bc256878031d63846">DATEFMT_ISO8601_SEP_SIZE</a></div><div class="ttdeci">#define DATEFMT_ISO8601_SEP_SIZE</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:74</div></div>
<div class="ttc" id="a03534_html_gae058e0e8944f408fa251bc4f4136d79c"><div class="ttname"><a href="a03534.html#gae058e0e8944f408fa251bc4f4136d79c">DATEFMT_RFC5280_GEN_SIZE</a></div><div class="ttdeci">#define DATEFMT_RFC5280_GEN_SIZE</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:78</div></div>
<div class="ttc" id="a03587_html_a4d171061df9e012fcfbd1172b8440d5f"><div class="ttname"><a href="a03587.html#a4d171061df9e012fcfbd1172b8440d5f">atcacert_tm_utc_s::tm_hour</a></div><div class="ttdeci">int tm_hour</div><div class="ttdef"><b>Definition:</b> atcacert_date.h:56</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_26647cdac0a1f8c717d44b4eb3b4ec89.html">atcacert</a></li><li class="navelem"><a class="el" href="a00143.html">atcacert_date.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
